import request from '@/utils/request'

// 查询品牌分页数据
export const GetBrandPage = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}
// 查询所有品牌数据
export const GetAllBrand = () => {
  return request({
    url: `/admin/product/brand/findAll`,
    method: 'get',
  })
}
//根据id删除品牌
export const DeleteBrandById = id => {
  return request({
    url: `/admin/product/brand/deleteById/${id}`,
    method: 'DELETE',
  })
}
//根据id查询品牌
export const GetBrandById = id => {
  return request({
    url: `/admin/product/brand/getById/${id}`,
    method: 'GET',
  })
}
//更新品牌
export const UpdateBrandById = brand => {
  return request({
    url: `/admin/product/brand/updateById`,
    method: 'PUT',
    data: brand,
  })
}
//新增品牌
export const SaveBrand = brand => {
  return request({
    url: `/admin/product/brand/save`,
    method: 'POST',
    data: brand,
  })
}
